package com.example.demo.model.form;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@Schema(description = "日志表单对象")
public class LogForm {

    @Schema(description = "日志ID")
    private String id;
    /**
     * 日志模块
     */
    @Schema(description = "日志模块")
    private String module;
    /**
     * 请求方式
     */
    @Schema(description = "请求方式")
    private String requestMethod;
    /**
     * 请求参数(批量请求参数可能会超过text)
     */
    @Schema(description = "请求参数")
    private String requestParams;
    /**
     * 返回参数
     */
    @Schema(description = "返回参数")
    private String responseContent;
    /**
     * 日志内容
     */
    @Schema(description = "日志内容")
    private String content;
    /**
     * 请求路径
     */
    @Schema(description = "请求路径")
    private String requestUri;
    /**
     * 方法名
     */
    @Schema(description = "方法名")
    private String method;
    /**
     * IP地址
     */
    @Schema(description = "IP地址")
    private String ip;
    /**
     * 省份
     */
    @Schema(description = "省份")
    private String province;
    /**
     * 城市
     */
    @Schema(description = "城市")
    private String city;
    /**
     * 执行时间(ms)
     */
    @Schema(description = "执行时间(ms)")
    private Long executionTime;
    /**
     * 浏览器
     */
    @Schema(description = "浏览器")
    private String browser;
    /**
     * 浏览器版本
     */
    @Schema(description = "浏览器版本")
    private String browserVersion;
    /**
     * 终端系统
     */
    @Schema(description = "终端系统")
    private String os;
    /**
     * 创建人ID
     */
    @Schema(description = "创建人ID")
    private String createBy;

    @Schema(description = "操作人")
    private String operator;
    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
}
